home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
buttons
/
toolb160
/
sample
/
find.frm
< prev
next >
Wrap
Text File
|
1994-09-05
|
3KB
|
106 lines
VERSION 2.00
Begin Form frmFind
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Find"
ClientHeight = 1125
ClientLeft = 1485
ClientTop = 990
ClientWidth = 5490
Height = 1530
Left = 1425
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 75
ScaleMode = 3 'Pixel
ScaleWidth = 366
Top = 645
Width = 5610
Begin CommandButton cmdCancel
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "&Cancel"
Height = 435
Left = 4260
TabIndex = 5
Top = 600
Width = 1095
End
Begin CommandButton cmdFind
BackColor = &H00C0C0C0&
Caption = "&Find Next"
Enabled = 0 'False
Height = 435
Left = 4260
TabIndex = 4
Top = 120
Width = 1095
End
Begin CheckBox chkWholeWord
BackColor = &H00C0C0C0&
Caption = "&Whole Word"
Height = 255
Left = 120
TabIndex = 3
Top = 780
Width = 1575
End
Begin CheckBox chkMatchCase
BackColor = &H00C0C0C0&
Caption = "&Match Case"
Height = 255
Left = 120
TabIndex = 2
Top = 480
Width = 1515
End
Begin TextBox txtFind
Height = 285
Left = 660
TabIndex = 1
Top = 120
Width = 3495
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Find:"
Height = 195
Left = 120
TabIndex = 0
Top = 180
Width = 435
End
End
Option Explicit
Declare Function SetParent Lib "User" (ByVal hWndChild As Integer, ByVal hWndNewParent As Integer) As Integer
Sub cmdCancel_Click ()
Unload Me
End Sub
Sub cmdFind_Click ()
gbMatchCase = chkMatchCase.Value
gbWholeWord = chkWholeWord.Value
gsFindText = txtFind.Text
FindText
End Sub
Sub Form_Load ()
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW
chkMatchCase.Value = gbMatchCase
chkWholeWord.Value = gbWholeWord
txtFind.Text = gsFindText
txtFind.SelLength = Len(gsFindText)
End Sub
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW
End Sub
Sub txtFind_Change ()
cmdFind.Enabled = (txtFind.Text <> "")
End Sub